<?php
/**
 * @file indigo/framework/classes/Sanitizer.php
 * Contains the definition of the Sanitizer class
 */
  namespace indigo\framework;
  
 /**
  * @class Sanitizer
  * Sanitation class 
  */
  class Sanitizer
  {
   /**
    * Strips null bytes from the input
    * @returns The sanitized input
    */
    public static function stripNullBytes(&$input)
    {
      $value = str_replace(chr(0), '', $input);
      return $input;
    }
    
   /**
    * Escape special characters for HTML output
    *
    * This function is simply a wrapper to the htmlspecialchars() function
    *
    * @note Since this function is currently a simple wrapper for htmlspecialchars(),
    *   you may opt to use htmlspecialchars() directly for performance reasons. At the time
    *   of this writing, there doesn't seem to be any additional sanitation routines that need
    *   be applied together with htmlspecialchars()
    *
    * @returns The sanitized input
    */
    public static function html($input)
    {
      echo htmlspecialchars($input);
    }
  }